package cn.fl.settlement.service;

import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.capital.condition.CapCstStmApplyQC;
import cn.fl.capital.condition.CapCstStmScheduleQC;
import cn.fl.capital.dto.CapCstStmApplyDTO;
import cn.fl.settle.dto.PrjStlRfdRcdDTO;
import cn.fl.settlement.vo.CapCstStmScheduleVO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description: 结清申请表 客户端服务层接口
 * @Author: judahan
 * @CreateDate: 2019/3/12 16:32
 * @Version: 1.0
 * 业务层方法名称前缀：
 * 新增：add*
 * 删除：remove*
 * 修改：modify*
 * 批量：batch*
 * 查询对象：select* get*
 * 查询集合：search*
 */
public interface ISettlementService {
    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page) throws BaseException;

    /**
     * 根据“结清申请记录id”查询结清申请信息
     * @param id 结清申请记录id
     * @return
     */
    CapCstStmApplyDTO selectById(Long id);

    /**
     * 根据条件查询所有
     * @param capCstStmApplyQC
     * @return
     * @throws BaseException
     */
    List<CapCstStmApplyDTO> searchList(CapCstStmApplyQC capCstStmApplyQC) throws BaseException;

    /**
     * 根据支付表ID和流程实例ID查询
     * @param paySchId
     * @param procInsId
     * @return
     * @throws BaseException
     */
    CapCstStmApplyDTO queryByPaySchIdAndProcId(Long paySchId, String procInsId) throws BaseException;

    /**
     * 按进度序号升序查询客户结清处理进度
     *
     * @param capCstStmScheduleQC
     * @return
     */
    List<CapCstStmScheduleVO> selectCapCstStmScheduleByCondition(CapCstStmScheduleQC capCstStmScheduleQC);

    /**
     * 试算结清对客IRR，返回试算的数据
     * @param paySchNo
     * @param stlAmt
     * @param date
     * @return
     * @throws BaseException
     */
    Map<String, Object> trialSettleIRRData(String paySchNo, Long stlAmt, Date date) throws BaseException;

    /**
     * 分页查询自动退款数据
     * @param page
     * @return
     * @throws BaseException
     */
    Pager searchAutoRefundListPage(Pager page) throws BaseException;

    /**
     * 根据ID查询自动退款详细信息
     * @param id
     * @return
     * @throws BaseException
     */
    PrjStlRfdRcdDTO selectAutoRefundById(Long id) throws BaseException;

    /**
     * 查询三方结清列表数据
     * @param page
     * @return
     * @throws BaseException
     */
    Pager searchStlTripleListPage(Pager page) throws BaseException;
}
